package com.zmn.oms.persistence.interfaces.dict;

import java.util.List;

import com.zmn.oms.model.entity.dict.ChannelZhimiFaultPart;
import org.apache.ibatis.annotations.Param;

/**
*  @author author
*/
public interface ChannelZhimiFaultPartDAO {

    ChannelZhimiFaultPart findByPartCode(@Param("partCode") String partCode, @Param("productCode") String productCode);

    /**
     * 通过三级故障编码查询对应的配件数量
     * @param faultCodeLv3List
     * @return
     */
    int countByFaultCodeLv3List(@Param("faultCodeLv3List") List<String> faultCodeLv3List, @Param("productCode") String productCode);

    List<ChannelZhimiFaultPart> query(ChannelZhimiFaultPart part);

    int insert(ChannelZhimiFaultPart part);

    int update(ChannelZhimiFaultPart part);

    int insertBatch(List<ChannelZhimiFaultPart> list);

    List<ChannelZhimiFaultPart> listFaultsByThirdModeCode(@Param("productCode") String productCode);

    int deleteAll();

}